<?php !defined( 'SUNCMS' ) && exit( 'No direct script access allowed'  );

/**
 * 
 * Sun CMS
 * 
 * @author			Burning
 * @copyright		Copyright (c) 2009, IsunCms.Com.
 * @license			http://www.isuncms.com/license.htm
 * @link				http://www.isuncms.com/
 * @since				Version 1.0 Beta
 * 
 */

if( $do == 'color' )
{
	include display( 'color_select' );
}
elseif( $do == 'special' )
{
	$special_list = get_special_list();
	include display( 'special_select' );
}
elseif( $do == 'thumb' )
{
	$frame = get_post( 'frame' );
	include display( 'thumb_upload' );
}
elseif( $do == 'preview' )
{
	$id = get_post( 'id' );
	$page = get_post( 'page' ); 
	$page = empty( $page )?1:$page;
	$article = get_article( $id, $page );
	$page_config = array
	(
			'base_url' => SITE_URL.SCRIPT_NAME.'?m=platform&a=dialog&do=preview&id='.$id,
			'cur_page' => $page,
			'num_pages' => $article['page_no']
	);
	$pagination = new Pagination( $page_config );
	$page_link = $pagination->create_links();
	include display( 'article_preview' );
}